class UpdateContentsForFlash < ActiveRecord::Migration
  def self.up
  add_column :contents , :is_flash ,:string
  add_column :contents , :is_music , :string
  
        content1= Content.new(:name=> "目录", :title => "根目录", :parent_id => 0 , :channel_id => 1 ,:is_article  =>"no"  )
      content1.save!
      
      content2= Content.new(:name=>"FLASH游戏", :title =>"FLASH游戏",:parent_id => 1 ,:is_flash=>"yes" ,:is_music=>"no" , :is_article=>"no" )
      content2.save!
      
       content2= Content.new(:name=> "减压音乐", :title => "减压音乐", :parent_id => 1 ,:is_music=>"yes"  , :is_article=>"no" ,:is_flash=>"no")
      content2.save!
      
      content3= Content.new(:name=> "文章资讯", :title => "文章资讯", :parent_id => 1 , :is_article  =>"no" ,:is_flash=>"no" ,:is_music=>"no" )
      content3.save!
      
      
  end

  def self.down
  remove_column :contents ,:is_flash
  remove_column :contents , :is_music
  end
end
